requirejs.config({
  'path': {
    'jquery': '//apps.bdimg.com/libs/jquery/2.1.4/jquery.min'
  }
});

require(['jquery'],function($) {
  $(() => {
    let $btnAdd = $('#add');

    $btnAdd.click(() => {
      require(['timer-button'],function(TimerBtn) {
        let btn = new TimerBtn();
        btn.show({
          container: '#test',
          title: '发送验证码',
          onClick: function() { console.log('timer button click!');  }
        });
      });
    });
  });
});
